This section describes the functions that let your application retrieve information about the desktop and set the desktop pattern. Ordinarily, your application doesn't need to manipulate any part of the desktop outside of its own windows.
Sets the desktop pattern on a computer that supports Color QuickDraw.
pascal void SetDeskCPat (PixPatHandle deskPixPat);
The SetDeskCPat function sets the desktop pattern to a specified pixel pattern, which can be drawn in more than two colors. After a call to SetDeskCPat , the desktop is automatically redrawn in the new pattern. If the specified pattern is a binary pattern (with a pattern type of 0), it is drawn is the current foreground and background colors. If the value of the deskPixPat parameter is nil , SetDeskCPat uses the standard binary desk pattern (that is, the 'ppat' resource with resource ID 16).
For compatibility with other Macintosh applications and the system software, applications should ordinarily not change the desktop pattern.
The Window Manager's desktop-painting functions can paint the desktop either in the binary pattern stored in the global variable DeskPattern or in a new pixel pattern. The desktop pattern used at startup is determined by the value of the parameter-RAM bit flag called pCDeskPat . If the value of pCDeskPat is 0, the Window Manager uses the new pixel pattern; if not, it uses the binary pattern stored in DeskPattern . The user can change the color pattern through the General Controls panel, which changes the value of pCDeskPat .
Gets the value of the global variable DeskPattern .
pascal void LMGetDeskPattern (Pattern *deskPatternValue);
Sets the handle to the region interpreted by the Window Manager as the current desktop region.
pascal void LMSetGrayRgn (RgnHandle value);
The LMSetGrayRgn function sets the value of the low-memory global GrayRgn , which contains a handle to a region interpreted by the Window Manager as the current desktop region.
To get a handle to the current desktop region, use GetGrayRgn (GetGrayRgn) .
Returns a handle to the current desktop region.
pascal RgnHandle GetGrayRgn (void);
The GetGrayRgn function returns a handle to the current desktop region from the global variable GrayRgn .
The desktop region represents all available screen space, that is, the desktop area displayed by all monitors attached to the computer. Ordinarily, your application doesn't need to access the desktop region directly.
When your application calls DragWindow (DragWindow) to let the user drag a window, it can use GetGrayRgn to set the limiting rectangle to the entire desktop area.
Gets a pointer to the Window Manager port on a system that supports Color QuickDraw.
pascal void GetCWMgrPort (CGrafPtr *wMgrCPort);
The GetCWMgrPort function places a pointer to the color Window Manager port in the value referenced through the parameter wMgrCPort . The GetCWMgrPort function is available only on computers with Color QuickDraw.
The Window Manager port is a graphics port that occupies all of the main screen. Ordinarily, your application doesn't need to access the Window Manager port.
Do not change any regions of the Window Manager port. If you do, the Window Manager might not handle overlapping windows properly.
Gets a pointer to the Window Manager port on a system with only the original monochrome QuickDraw.
pascal void GetWMgrPort (GrafPtr *wPort);
The GetWMgrPort function places a pointer to the Window Manager port in the value referenced through the parameter wPort .
The Window Manager port is a graphics port that occupies all of the main screen. Ordinarily, your application doesn't need to access the Window Manager port.
Do not change any regions of the Window Manager port. If you do, the Window Manager might not handle overlapping windows properly.